package cn.edu.xmu.oomall.customer.model.vo;

import cn.edu.xmu.oomall.core.model.VoObject;
import cn.edu.xmu.oomall.customer.model.po.CustomerPo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
/**
 * @author Jiazhe Yuan
 * @date 2021-12-14 12:27:52
 */
public class SimpleCustomerRetVo implements VoObject{
    private Long id;
    private String name;

    public SimpleCustomerRetVo(CustomerPo po) {
        this.id = po.getId();
        this.name = po.getName();
    }

    @Override
    public Object createVo() {
        return new SimpleCustomerRetVo(id, name);
    }

    @Override
    public Object createSimpleVo() {
        return new SimpleCustomerRetVo(id, name);
    }
}
